﻿using System;
using System.Configuration;

namespace SmartCA.Infrastructure.RepositoryFramework.Configuration
{
    /**
     * RepositoryMappingElement类是实际拥有接口类型名称和具体仓储类型名称之间映射的类
     * 
     * */
    public sealed class RepositoryMappingElement : ConfigurationElement
    {
        [ConfigurationProperty(RepositoryMappingConstants.InterfaceShortTypeNameAttributeName, IsRequired = true)]
        public string InterfaceShortTypeName
        {
            get { return (string)this[RepositoryMappingConstants.InterfaceShortTypeNameAttributeName]; }
            set { this[RepositoryMappingConstants.InterfaceShortTypeNameAttributeName] = value; }
        }

        [ConfigurationProperty(RepositoryMappingConstants.RepositoryFullTypeNameAttributeName, IsRequired = true)]
        public string RepositoryFullTypeName
        {
            get { return (string)this[RepositoryMappingConstants.RepositoryFullTypeNameAttributeName]; }
            set { this[RepositoryMappingConstants.RepositoryFullTypeNameAttributeName] = value; }
        }
    }
}
